import request from '@/utils/request'

/**
 *
 * @returns 营业额统计
 */
export const tutrnoverStatistics = (begin, end) => {
  return request.get('/admin/report/turnoverStatistics', {
    params: {
      begin: begin,
      end: end
    }
  })
}

/** 用户统计
 *
 * @param {*开始时间} begin
 * @param {*结束时间} end
 * @returns
 */
export const usercount = (begin, end) => {
  return request.get('/admin/report/Statistics', {
    params: {
      begin: begin,
      end: end
    }
  })
}

/** 订单统计
 *
 * @param {*开始时间} begin
 * @param {*结束时间} end
 * @returns
 */
export const orderCount = (begin, end) => {
  return request.get('/admin/report/orderStatistics', {
    params: {
      begin: begin,
      end: end
    }
  })
}

/** 销量排名统计
 *
 * @param {*开始时间} begin
 * @param {*结束时间} end
 * @returns
 */
export const ranking = (begin, end) => {
  return request.get('/admin/report/top10', {
    params: {
      begin: begin,
      end: end
    }
  })
}
